<?php
/*  base url /api  */
Route::get('meta/asset-meta', 'Asset\AssetMetaController@meta')->name('asset.meta');
Route::get('asset/meta/brand', 'Asset\AssetMetaController@metaBrand')->name('asset.meta.brand');
Route::get('asset/meta/affiliation', 'Asset\AssetMetaController@metaAffiliation')->name('asset.meta.affiliation');
Route::get('asset/meta/vendor', 'Asset\AssetMetaController@metaVendor')->name('asset.meta.vendor');
Route::get('asset/meta/keeper', 'Asset\AssetMetaController@metaKeeper')->name('asset.meta.keeper');
Route::get('asset/meta/location', 'Asset\AssetMetaController@metaLocation')->name('asset.meta.location');
Route::post('asset/list', 'Asset\AssetController@list')->name('asset.list');
Route::post('asset/delete/{id}', 'Asset\AssetController@delete')->name('asset.delete');


Route::post('asset/brand', 'Asset\AssetBrandController@store')->name('asset.brand.store');
Route::post('asset/affiliation', 'Asset\AssetAffiliationController@store')->name('asset.affiliation.store');
Route::post('asset/keeper', 'Asset\AssetKeeperController@store')->name('asset.keeper.store');
Route::post('asset/vendor', 'Asset\AssetVendorController@store')->name('asset.vendor.store');
Route::post('asset/location', 'Asset\AssetLocationController@store')->name('asset.location.store');
Route::resource('asset', 'Asset\AssetController');

/* Asset Excel */
Route::get('asset/excel/export_template', 'Asset\AssetExcelController@exportTemplate')->name('asset.excel.export_template');
Route::get('asset/excel/export', 'Asset\AssetExcelController@exportExcel')->name('asset.excel.export');
Route::post('asset/excel/import', 'Asset\AssetExcelController@import')->name('asset.excel.import');

/*asset-stock*/
Route::resource('asset-stock', 'Asset\AssetStockController');
Route::post('asset-stock/list', 'Asset\AssetStockController@list')->name('asset-stock.list');
Route::get('asset-stock/get/{id}', 'Asset\AssetStockController@getAssetStock')->name('asset-stock.get');
Route::post('asset-stock/delete/{id}', 'Asset\AssetStockController@delete')->name('asset-stock.delete');


/* AssetStock Excel*/
Route::get('asset-stock/excel/export_template', 'Asset\AssetStockExcelController@exportTemplate')
    ->name('asset-stock.excel.export_template');
Route::get('asset-stock/excel/export', 'Asset\AssetStockExcelController@exportExcel')
    ->name('asset-stock.excel.export');
Route::post('asset-stock/excel/import', 'Asset\AssetStockExcelController@import')
    ->name('asset-stock.excel.import');


/* AssetStockChangeHistory*/
Route::post('asset-stock-change-history/list/{id}', 'Asset\AssetStockChangeHistoryController@list')
    ->name('asset-stock-change-history.list');
Route::post('asset-stock-change-history/add/{id}', 'Asset\AssetStockChangeHistoryController@add')
    ->name('asset-stock-change-history.add');

/* AssetBundle */
Route::post('asset-bundle/list', 'Asset\AssetBundleController@list')->name('asset-bundle.list');
Route::post('asset-bundle/add', 'Asset\AssetBundleController@add')->name('asset-bundle.add');
Route::post('asset-bundle/update/{id}', 'Asset\AssetBundleController@update')->name('asset-bundle.update');
Route::delete('asset-bundle/del/{id}', 'Asset\AssetBundleController@del')->name('asset-bundle.del');
Route::post('asset-bundle/items/add/{id}', 'Asset\AssetBundleController@addItem')->name('asset-bundle.items.add');
Route::post('asset-bundle/items/list/{id}', 'Asset\AssetBundleController@itemList')->name('asset-bundle.items.list');
Route::delete('asset-bundle/items/del/{id}', 'Asset\AssetBundleController@delItem')->name('asset-bundle.items.del');
Route::post('asset-bundle/items/del-by-ids', 'Asset\AssetBundleController@delItemByIds')->name('asset-bundle.items.delByIds');
Route::post('asset-bundle/asset/query', 'Asset\AssetBundleController@assetQuery')->name('asset-bundle.asset.query');


/*  filterable bundle */
Route::post('filterable-bundle/list', 'Asset\FilterableAssetBundleController@list')->name('filterable-bundle.list');
Route::post('filterable-bundle/add', 'Asset\FilterableAssetBundleController@add')->name('filterable-bundle.add');
Route::post('filterable-bundle/update/{id}', 'Asset\FilterableAssetBundleController@update')->name('filterable-bundle.update');
Route::delete('filterable-bundle/delete/{id}', 'Asset\FilterableAssetBundleController@delete')->name('filterable-bundle.delete');
Route::post('filterable-bundle/criteria/list/{id}', 'Asset\FilterableAssetBundleController@listCriteria')->name('filterable-bundle.criteria.list');
Route::post('filterable-bundle/criteria/add/{id}', 'Asset\FilterableAssetBundleController@addCriterion')->name('filterable-bundle.criteria.add');
Route::post('filterable-bundle/criteria/update/{id}', 'Asset\FilterableAssetBundleController@updateCriterion')->name('filterable-bundle.criteria.update');
Route::delete('filterable-bundle/criteria/delete/{id}', 'Asset\FilterableAssetBundleController@delCriterion')->name('filterable-bundle.criteria.del');
Route::post('filterable-bundle/criteria/del-by-ids', 'Asset\FilterableAssetBundleController@delCriteriaByIds')->name('filterable-bundle.criteria.delByIds');
Route::post('filterable-bundle/criterion/filter/{id}', 'Asset\FilterableAssetBundleController@criterionFilterResult')->name('filterable-bundle.criterion.filter');


/* attachment related rest api */
Route::post('attachments/list', 'Common\AttachmentController@list')->name("attachments.list");
Route::post('attachments/delete/{id}', 'Common\AttachmentController@delete')->name("attachments.delete");
